package com.thoughtworks.impersonator.http.technorati;

import com.thoughtworks.impersonator.http.message.RawRequest;
import com.thoughtworks.impersonator.http.message.RequestIdentifier;

public class TechnoratiRequestIdentifier implements RequestIdentifier {

    public String calculateUid(RawRequest rawRequest) {
        String parameter = rawRequest.getParameter("query");
        if (parameter != null) {
            return "technorati-search-" + parameter;
        } else {
            throw new RuntimeException("Invalid technorati search");
        }
    }

}
